
import 'package:cunyutech_flutter_ui/src/theme/main.dart';
import 'package:flutter/widgets.dart';

class PhotoPickerFirstLoadingSkeleton extends StatelessWidget {
  const PhotoPickerFirstLoadingSkeleton({ Key key, this.spacing, this.count = 24, this.ratio = 1, this.rowCount = 4, }) : super(key: key);

  final double spacing;
  final int count;
  final double ratio;
  final int rowCount;

  @override
  Widget build(BuildContext context) {
    var cs = CYThemeData.of(context);
    final List<Widget> list = [];
    for(var i=0;i<count;i++) {
      list.add(Container(color: cs.backColorSystem.secondaryColor));
    }
    return Container(
        child: GridView.count(
          crossAxisCount: rowCount,
          childAspectRatio: ratio,
          mainAxisSpacing: spacing,
          crossAxisSpacing: spacing,
          children: list,
        ),
      );
  }
}
